define([ "PDUtilDir/grid", "PDUtilDir/searchBlock" ],
		function(Grid, SearchBlock) {

			function init(cache, updateObj, detailObj, searchObj) {
				SearchBlock.init('searchBlockId');
				// 初始化
				return Grid({
					id : "GuideGirdDivId",
					pageSize : 10,
					index : true,
					multi : true,
					pagination : true,
					cache : false,
					layout : [ {
						name : "姓名",
						field : "guideName",
						sort : true,
						click : function(e) {
							detailObj.run(e.data.row.id);
						}
					}, {
						name : "联系电话",
						field : "guidePhone",
						sort : true
					}, {
						name : "身份证",
						field : "certificatesNumber"
					}/*, {
						name : "常在省",
						field : "province"
					}, {
						name : "常在城市",
						field : "city"
					}, {
						name : "证件类型",
						field : "certificates",
						format:function(e){
							if(!cache.certificates)
								return;
							for(var i=0;i<cache.certificates.length;i++){
								if(cache.certificates[i].dictCode==e.row.certificates){
									return cache.certificates[i].dictName;
								}
							}
						}
					}, {
						name : "到期时间",
						field : "guideCardDueTime"
					}*/, {
						name : "状态",
						field : "auditStatus",
						format : function(e) {
							return cache.statusMap.get(e.row.auditStatus);
						}
					} ],
					toolbar : [ /*{
						name : "详情",
						icon : "fa fa-trash-o",
						callback : function(event) {
							detailObj.run();
						}
					},*/ {
						name : "查询",
						icon : "fa fa-search",
						callback : function(event) {
						    searchObj.run();
						}
					} ],
					data : {
						type : 'URL',
						value : getServer() + '/flea/hclv/guide/selectAll.htmls'
					}
				});
			}
			return {
				init : init
			}
		});